﻿(function () {

    $(document).ready(function () {

        $("#searchBox").watermark("Buscar");
        //Perform the search
        $('#searchBox').keyup(function (e) {
            var code = e.which;
            if (code == 13) e.preventDefault();
            if (code == 32 || code == 13 || code == 188 || code == 186) {
                DoSearch();
            }
        });

        $('#searchButton').on('click', function () {
            DoSearch();
        });

        function DoSearch() {
            var valueToSearch = $('#searchBox').val();

            if (valueToSearch.length === 0) {
                return;
            }

            var searchURL = $('#searchURL').val();
        }
    });

})()